package com.xianyun.site.support.common.define;

/**
 * 用户类型枚举
 * @author mac_zyj
 */
public enum UserTypeEnum {
    /**普通用户*/
    COMMON_SUER(1,"普通用户"),
    /**VIP用户*/
    VIP_USER(2,"VIP用户"),
    /**系统管理员*/
    SYSTEM_MANAGER(0,"系统管理员");

    private final int typeId;

    private final String typeName;

    UserTypeEnum(int typeId, String typeName) {
        this.typeId = typeId;
        this.typeName = typeName;
    }

    public static String getTypeNameByTypeId(int typeId){
        for (UserTypeEnum userTypeEnum : values()){
            if (typeId == userTypeEnum.typeId){
                return userTypeEnum.typeName;
            }
        }
        return null;
    }
}
